package com.cloud.util;

/**
 * @author Henry.Song
 * @version 2020/12/15
 * @description
 */
public class UrlUtil {
  public static String formatUrl(String url) {
    if (!url.startsWith("http://")) {
      url = "http://" + url;
    }

    if (!url.endsWith("/")) {
      url = url + "/";
    }

    return url;
  }


  public static String standardURL(String url) {
    if (url != null && !url.endsWith("/")) {
      return url + "/";
    }
    return url;
  }
}
